package module.building.event
{
	import flash.events.Event;

	public class BuildEvent extends Event
	{
		private var _data:Object;
		
		
		public static const BUILD_UP_CLOSE:String = "BUILD_UP_CLOSE";
		
		public static const BUILD_UPGRADE:String = "BUILD_UPGRADE";
		
		
		private static const BUILDEVENT_KEY:String = "BuildEvent."
		/**
		 * 环形菜单内的选项被点击 
		 */		
		public static const BUILD_RING_ITEM_CLICK:String = BUILDEVENT_KEY+"build_ring_item_click";
		/**
		 * 选中建造列表中的一个建筑选项 
		 */
		public static const BUILD_LIST_ITEM_SELECT:String = BUILDEVENT_KEY+"build_list_item_select";
		
		/**
		 * 选中建筑按钮面板中的一个按钮 
		 */
		public static const BUILD_BUTTON_SELECT:String = BUILDEVENT_KEY+"build_button_select";
		
		/**
		 * 点击红叉叉事件 
		 */
		public static const BUILD_CLOSE:String = BUILDEVENT_KEY+"build_close";
		
		/**
		 *	点击收获tip 
		 */		
		public static const HARVEST_CLICK:String = BUILDEVENT_KEY + "harvest_click";
		
		/**
		 *	生产 
		 */		
		public static const PRODUCE:String = "PRODUCE";
		
		/**
		 *	收获 
		 */		
		public static const HARVEST:String = "HARVEST";
		
		/**
		 * 确认面板中“保存之前修改”的事件 
		 */
		public static const CONFIRMPANEL_SAVE:String = BUILDEVENT_KEY+"confirmPanel_save";
		
		/**
		 *  确认面板中“撤销之前修改”的事件
		 */
		public static const CONFIRMPANEL_UNDO:String = BUILDEVENT_KEY+"confirmPanel_undo";
		
		/**
		 * 确认面板中“删除当前建筑”的事件 
		 */
		public static const CONFIRMPANEL_REMOVE:String = BUILDEVENT_KEY+"confirmPanel_remove";
		/**
		 * 确认面板中“保持当前建筑”的事件 
		 */
		public static const CONFIRMPANEL_REMAIN:String = BUILDEVENT_KEY+"confirmPanel_remain";
		/**
		 *收获金币事件 
		 */		
		public static const RECRUIT_RESOUSE:String = "recruit_resouse";
		
		public function BuildEvent(type:String,data:Object=null,bubbles:Boolean=false,cancelable:Boolean=false)
		{
			_data = data;
			super(type,bubbles,cancelable);
		}
		
		public function set data(value:Object):void
		{
			_data = value;
			
		}
		
		public function get data():Object
		{
			return _data;
		}
		
		override public function clone():Event
		{
			var $e:BuildEvent = new BuildEvent(type,data,bubbles,cancelable);
			return $e;
		}
	}
}